package com.sen.gulimall.ware.feign;

import com.sen.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @InterfaceName: ProductFeignService
 * @Title: gulimall
 * @Package: com.sen.gulimall.ware.feign
 * @Description:
 * @Author: Kisen
 * @Date: 2022/3/13 18:12
 */
@FeignClient("gulimall-gateway")
public interface ProductFeignService {

    /**
     *
     *      /product/skuinfo/info/{skuId}
     *      /api/product/skuinfo/info/{skuId}
     *
     * 1)、让所有请求过网关：
     *      1、@FeignClient("gulimall-gateway")：给gulimall-gateway所在的机器发请求
     *      2、/api/product/skuinfo/info/{skuId}
     * 2)、直接让后台指定服务处理
     *      1、@FeignClient("gulimall-product")
     *      2、/product/skuinfo/info/{skuId}
     *
     * @param skuId
     * @return
     */
    @RequestMapping("/api/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
